/***************************************************************************
 *  Filename: processgui.h
 *  Class: ProcessGUI
 *
 *  Copyright 2012  Xander van Kooten
 *  <xandervk@gmail.com>
 *
 *  Copyright 2012  Mario Henrique Voorsluys
 *  <forcaeluz@gmail.com>
 *
 ****************************************************************************/

/*
 *
 * This file is part of Parsax-Remote-Controller.
 *
 *    Parsax-Remote-Controller is free software: you can redistribute it
 *    and/or modify it under the terms of the GNU General Public License
 *    as published by the Free Software Foundation, either version 3 of the
 *    License, or (at your option) any later version.
 *
 *    Parsax-Remote-Controller is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU General Public License for more details.
 *
 *    You should have received a copy of the GNU General Public License
 *    along with Parsax-Remote-Controller.
 *    If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef PROCESSGUI_H
#define PROCESSGUI_H

#include <QWidget>
#include "remoteprocess.h"

namespace Ui {
class ProcessGUI;
}

class ProcessGUI : public QWidget
{
    Q_OBJECT
    
public:
    explicit ProcessGUI(RemoteProcess *proc = 0, QWidget *parent = 0);
    ~ProcessGUI();
    void setId(QString tid);
    void setPc(QString pc);
    void setProgram(QString tprogram);
    void setParameters(QStringList tparameters);
    void setStatus(QString status);

    QString getId();
    QString getPc();
    QString getProgram();
    QString getParametersString();
    QStringList getParameters();
    QString getStatus();

    void appendClo(QString lines);
    void appendClE(QString lines);
    RemoteProcess *getProcess();
signals:
    void infoUpdated();
private slots:
    void on_programEdit_editingFinished();
    void on_paramEdit_editingFinished();
    void whenCloReceived(int type, QString message);
private:
    Ui::ProcessGUI *ui;
    QString mypc;
    QString myid;
    QString program;
    QStringList parameters;
    QString status;
    RemoteProcess *process;
};

#endif // PROCESSGUI_H
